-- aid_damage
-- create by wangy
-- 攻击x怪物时，伤害+%

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 攻击时触发
    trigger = function(who, prop, arg)
        local target = arg;
        if  not target then
            return false;
        end

        if prop[3] <= 0 then
            return false;
        end

        -- 如果不是相应的怪物
        local baseClassId = target:query("base_class_id");
        if baseClassId ~= tonumber(prop[2]) then
            return false;
        end

        return true;
    end,

    record = function(target, prop, path)
        return false;
    end
};
